<include file="Public:header2"/>

<div class="main">
    <div class="box_m">

        <include file="Public:main_left2"/>

        <div class="main_r">
            <div class="main_r_t">
                修改密码
            </div>
            <div class="main_r_c">
                <div class="form_ul">
                    <div class="form_li">
                        <div class="form_li_l">用户名：</div>
                        <div class="form_li_r">{$_SESSION.username}</div>
                        <div class="clear"></div>
                    </div>
                    <form action="{:U('Index/dopwd')}" method="post" onsubmit="return dopwd();">
                        <div class="form_li">
                            <div class="form_li_l">原密码：</div>
                            <div class="form_li_r">
                                <input type="password" class="input_text" id="pwd" name="pwd"/>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <div class="form_li">
                            <div class="form_li_l">新密码：</div>
                            <div class="form_li_r">
                                <input type="password" class="input_text" id="pwd1" name="pwd1"/>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <div class="form_li">
                            <div class="form_li_l">确认密码：</div>
                            <div class="form_li_r">
                                <input type="password" class="input_text" id="pwd2" name="pwd2"/>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <div class="form_li">
                            <div class="form_li_l">&nbsp;</div>
                            <div class="form_li_r">
                                <input type="submit" class="form_btn"/>
                            </div>
                            <div class="clear"></div>
                        </div>
                    </form>

                </div>
            </div>

        </div>
        <div class="clear"></div>
    </div>
</div>
<script type="text/javascript">
    function dopwd() {
        var pwd = $("#pwd").val();
        var pwd1 = $("#pwd1").val();
        var pwd2 = $("#pwd2").val();
        if (pwd == "") {
            alert("请输入原密码！");
            return false;
        }
        if (pwd1 == "") {
            alert("请输入新密码！");
            return false;
        }
        if (pwd2 == "") {
            alert("请确认新密码！");
            return false;
        }
        if (pwd1!=pwd2) {
            alert("确认密码错误！");
            return false;
        }
    }
</script>

<include file="Public:bottom"/>